<template>
  <div class="nv-news-inner">
    <div class="nv-news-item">
      <div class="nv-news-info">
        <div class="ch-number">
          <div class="ch-num-avatar">
            <img :src="info.authorAvatar" alt="" />
          </div>
          <div class="ch-num-name">{{ info.authorName }}</div>
          <i class="ch-num-icon"></i
          ><!---->
        </div>
        <span class="nv-news-tit">{{ info.title }}</span>
        <div class="nv-news-tipper">
          <span class="nv-news-tip-col">8小时前</span
          ><span class="nv-news-circle"></span
          ><span class="nv-news-tip-col">{{ info.readNum }}阅读</span>
        </div>
      </div>
      <div class="nv-news-pic">
        <img
          :src="info.cover"
          alt=""
          mode="aspectFill"
          class="nv-news-pic-img"
        />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'VueJiangduoduoComNewsItem',
  props: {
    info: {
      type: Object,
      default() {
        return {};
      },
    },
  },
  data() {
    return {};
  },

  mounted() {},

  methods: {},
};
</script>

<style lang="scss" scoped>
.nv-news-inner {
  position: relative;
  background: white;
  &::before {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    content: "";
    width: 100%;
    height: 1px;
    background-color: #e4e4e4;
    transform: scaleY(0.5);
    transform-origin: 0 0;
  }
  .nv-news-item {
    position: relative;
    width: 100%;
    padding: 14px 0;
    display: flex;
    flex-direction: row !important;
    line-height: 1.5;
    box-sizing: border-box;
    .nv-news-info {
      flex: 1;
      min-width: 0;
      word-wrap: break-word;
      word-break: break-all;
      .ch-number {
        display: flex;
        align-items: center;
        .ch-num-avatar {
          width: 20px;
          height: 20px;
          flex-shrink: 0;
          border-radius: 50%;
          overflow: hidden;
          margin-right: 6px;
          img {
            width: 100%;
            height: 100%;
            display: block;
          }
        }
        .ch-number .ch-num-name {
          margin-right: 2px;
          color: #3a3a3a;
          font-size: 15px;
          word-break: keep-all;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
        .ch-num-icon {
          width: 15px;
          height: 15px;
          display: inline-block;
          flex-shrink: 0;
          background: url()
            no-repeat center center/contain;
        }
      }
      .nv-news-tit {
        height: 52px;
        font-size: 17px;
        color: #3a3a3a;
        margin-bottom: 6px;
        lines: 2;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
      }
      .nv-news-tipper {
        display: flex;
        flex-direction: row;
        align-items: center;
        .nv-news-tip-col {
          flex-shrink: 0;
          color: #999;
          font-size: 12px;
          display: inline-flex;
          align-items: center;
        }
        .nv-news-circle {
          width: 2px;
          height: 2px;
          border-radius: 50%;
          background-color: #d8d8d8;
          margin: 0 7px;
          //   display: none;
        }
        .nv-news-tip-col {
          flex-shrink: 0;
          color: #999;
          font-size: 12px;
          display: inline-flex;
          align-items: center;
        }
      }
    }
    .nv-news-pic {
      width: 96px;
      height: 72px;
      border-radius: 2px;
      overflow: hidden;
      flex-shrink: 0;
      margin-left: 12px;
      .nv-news-pic-img {
        width: 96px;
        height: 72px;
        display: block;
        object-fit: cover;
      }
    }
  }
}
</style>
